import { ref, computed } from 'vue'
import { defineStore } from 'pinia'


export const useLoginStore = defineStore('LoginStore', () => {
    let loginUsername=ref('2448480486')
    let loginToken=ref('')
    function setLoginInfo(username:string,token:string){
      loginUsername.value=username
      loginToken.value=token
    }
    return {loginUsername,loginToken,setLoginInfo}}
    ,{
      persist:{
        key:'loginStore',
        storage:localStorage
      }
    }
)
